package emulator.unittest.hardware.nmos6502.commands;

import static org.junit.Assert.*;

import org.junit.Test;

import emulator.EmulatorException;
import emulator.hardware.HwByte;
import emulator.hardware.nmos6502.Cpu6502;
import emulator.hardware.nmos6502.commands.TXS;
import emulator.unittest.hardware.nmos6502.MockOperand;

public class TXSTest {

	@Test
	public void testExecute() throws EmulatorException {
		Cpu6502 cpu = new Cpu6502();
		cpu.setX(new HwByte(0xFF));
		cpu.setSP(new HwByte(0));
		TXS txs = new TXS();
		txs.execute(cpu, new MockOperand(0));
		assertEquals(0xFF, cpu.getX().getNumber());
		assertEquals(0xFF, cpu.getSP().getNumber());
	}

}
